﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Customer.Bussiness_Service;
using Entity;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using ServiceCore;

namespace Customer.Areas.System.Controllers
{
    [ApiController, Area("System"), Route("/mch_type/[action]")]
    public class mch_typeController : ControllerBase
    {
        private readonly Imch_type_service _service;
        private readonly IToole_DI _tool;
        public mch_typeController(Imch_type_service service, IToole_DI tool)
        {
            _service = service;
            _tool = tool;
        }
        /// <summary>
        /// 获取菜单列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [HttpGet]
        public ResultObjModel get()
        {
            var result = _service.get_mch_type();
            return result;
        }
        /// <summary>
        ///  保存机器类型设置
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        [HttpPost]
        public ResultObjModel save(List<mch_type> list)
        {
            var result = _service.save_mch_type(list);
            return result;
        }
        /// <summary>
        /// 获取子类型
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        [HttpGet]
        public ResultObjModel get_kid()
        {
            var result = _service.get_kid_mch_type();
            return result;
        }
    }
}